<template>
  <div class="p-base-info">
    <a-descriptions bordered size="small" style="margin-top:20px;">
      <a-descriptions-item label="姓名" span="3">
        <span class="item-content">{{ infoData.name }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="性别" span="3">
        <span class="item-content">{{ infoData.gender }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="身份证号" span="3">
        <span class="item-content">{{ infoData.idcard }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="职称" span="3">
        <span class="item-content">{{ infoData.zhicheng }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="职务" span="3">
        <span class="item-content">{{ infoData.zhiwu }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="职称证书号" span="3">
        <span class="item-content">{{ infoData.zzzsh }}</span>
      </a-descriptions-item>
      <a-descriptions-item label="从业单位" span="3">
        <span class="item-content">{{ infoData.cydw }}</span>
      </a-descriptions-item>
      <!-- <a-descriptions-item label="是否在职" span="3">
        <span class="item-content">{{ infoData.isEmployed?'是':infoData.isEmployed==false?'否':'' }}</span>
      </a-descriptions-item> -->
      <a-descriptions-item label="职称核发日期" span="3">
        <span class="item-content"  v-if="infoData.dateZchf!=='' && infoData.dateZchf!==null">
          {{ moment(infoData.dateZchf).format("YYYY-MM-DD") }}
        </span>
      </a-descriptions-item>
      <a-descriptions-item label="附件" span="3">
        <template v-for="(item,index) in infoData.fileupload">
          <div  :key="index" style="margin-bottom:5px;" >
            {{item.name}}  <a @click="downloadPDf(item)">下载</a>
           </div>
        </template>
      </a-descriptions-item>
    </a-descriptions>
  </div>
</template>

<script>
import emv from "@/views/center/emptyVue.vue";
import download from 'downloadjs'; // 引用插件
export default {
  props: {
    infoData:{
      type:Object
    },
  },
  data() {
    return {
        // baseInfoData:{
        //   xm:'袁 忠',
        //   xb:'男',
        //   sfzh:'4600000000000000',
        //   zc:'副高',
        //   zw:'正科',
        //   zczsh:'VB00000000000 ',
        //   cydw:'海南省海口',
        //   sfzz:'是',
        //   zchfrq:'2013-01-31',
        // },
    }
  },
  created(){
      emv.$emit("setfootmargintop",10);
  },
  methods: {
    downloadPDf(item){
          download("/api"+item.path); 
    }
  }
};
</script>

<style lang="less">
.p-base-info {
  margin-bottom: -18px;
  .item-content{
    font-size: 14px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: #333333;
    
  }
  // .ant-descriptions-bordered.ant-descriptions-small .ant-descriptions-item-label{
  //   padding: 8px 16px;
  //   text-align: center;;
  //   color: #333333;
  //   font-size: 13px;
  //   font-family: Microsoft YaHei;
  //   font-weight: 400;
  //   width: 150px;
  // }
  // .ant-descriptions-bordered.ant-descriptions-small .ant-descriptions-item-content{
  //   padding: 8px 16px;
  //   text-align: left;
  //   color: #333333;
  //   font-size: 13px;
  //   font-family: Microsoft YaHei;
  //   font-weight: 400;
  //   // width: 150px;
  // }
  
}
</style>